<template>
  <div class="app-container">
    <nabars index="4" :numid="num"></nabars>
    <div class="linebtn" style="margin-top: 15px;">
      <div class="btn" @click="setIdx(0)" :class="idx == 0 ? 'select' : ''">聊天提醒</div>
      <div class="btn" @click="setIdx(1)" :class="idx == 1 ? 'select' : ''">聊天记录</div>
      <div class="btn" @click="setIdx(2)" :class="idx == 2 ? 'select' : ''">群发助手</div>    
    </div>

    <chat_one v-if="idx == 0" @changehandle="changehandle"></chat_one>
    <chat_two v-if="idx == 1"></chat_two>
    <timedTwo v-if="idx == 2"></timedTwo>

  </div>
</template>

<script>
import nabars from '../components/nabar.vue';
import chat_one from '../components/chat_one.vue';
import chat_two from '../components/chat_two.vue';
// import chat_three from '../components/chat_three.vue';
import timedTwo from '../components/timed-two.vue';
export default {
  name: "chat",
  components: {
    nabars,
    chat_one,
    chat_two,
    // chat_three,
    timedTwo
  },
  data() {
    return {
      activeName: 'first',//表示默认就是在第一个上面
      idx: 0,
      num:'',
    };
  },
  methods: {
    // handleClick(tab, event) {
    //   console.log(tab, event);
    // }
    setIdx(idx) {
      this.idx = idx
    },
    changehandle(data){
      this.num=data
    },
  }
}
</script>
<style scoped lang="scss">
.app-container {
  background-color: #f6f9fb;
}

.line-state {
  display: flex;
  width: 390px;
  border: 1px solid #d1e5ff;
  font-size: 14px;
  border-radius: 5px;
  background-color: #fff;

  .state-box {
    width: 130px;
    height: 35px;
    color: #8c8c8c;
    text-align: center;
    line-height: 35px;
  }

  .frist-border {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }

  .end-border {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

  .select {
    color: #fff;
    background-color: #288dfc;
  }
}

.frominfo {
  display: flex;
  background-color: #fff;
  padding: 10px;
  padding-bottom: 0;
  margin-bottom: 20px;

  .from-item {
    display: flex;
    flex-wrap: wrap;
  }

  .from-Btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
  }
}

.linebtn {
  display: flex;
  margin: -10px 0 10px 5px;
  height: 38px;

  .btn {
    width: 180px;
    text-align: center;
    line-height: 38px;
    font-size: 14px;
    color: #8c8c8c;
    margin-right: 10px;
    border: 1px solid #eaeff2;
    background-color: #fff;
    border-radius: 5px;

    .link-type {
      color: #8c8c8c;
    }
  }

  .select {
    background-color: #eaf6ff;
    border: 1px solid #288dfc;
    color: #288dfc;
    font-weight: 550;
  }
}</style>